<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>admin_ui</title>
</head>
<style>
#context1 span {
    background-color: red;
}
#context2 {
    background-color: gold;
}
</style>
<body>
<div id="context1">
    <span>
         hello_word1
    </span>
</div>
<div id="context2">
    hello_word2
</div>
<button type="button" onclick="getData()"> 点击</button>
</body>
</html>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"/>
<script type="text/javascript">
function getData(){
    $.ajax({
        url: "/test",
        dataType: "json",
        type: "get",
        success: function(result) {  //这里就是我出错的地方
            alert(result);
        },
        error: function(data) {
            alert("请求出错");
            alert(data);
        }
    });
}
</script>
